import { Column, Model, Table } from 'sequelize-typescript';
import { DataTypes } from 'sequelize';

@Table({ tableName: 'dp_group' })
export class DPGroupModel extends Model {
  @Column({ type: DataTypes.STRING, field: 'title' })
  title!: string;

  @Column({ type: DataTypes.JSON, field: 'condition' })
  condition!: string;

  @Column({ type: DataTypes.TINYINT, field: 'type' })
  type!: number;

  @Column({ type: DataTypes.STRING, field: 'status_msg' })
  statusMsg!: string;

  @Column({ type: DataTypes.TINYINT, field: 'status' })
  status!: number;

  @Column({ type: DataTypes.TINYINT, field: 'down_url' })
  downUrl!: number;

  @Column({ type: DataTypes.TINYINT, field: 'create_id' })
  createId!: number;

  @Column({ type: DataTypes.STRING, field: 'creator' })
  creator!: string;

  @Column({ type: DataTypes.JSON, field: 'columns' })
  columns!: string;
}
